From: Jasper St. Pierre Date: Mon, 15 Jul 2013 23:38:05 +0000 (-0400) Subject: popupMenu: Fix closing submenus when clicking on the expander X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3924 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a2b499c4609494e24f8726eda5536fd13a0a8cdb;p=gnome-shell.git popupMenu: Fix closing submenus when clicking on the expander We need to make sure that we reset the opened submenu when we close the submenu, not trick the toplevel into thinking a closed submenu is the currently opened menu. https://bugzilla.gnome.org/show_bug.cgi?id=704336 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index b8503bf76..7aaecf52d 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -1369,12 +1369,13 @@ const PopupSubMenuMenuItem = new Lang.Class({ }, _subMenuOpenStateChanged: function(menu, open) { - if (open) + if (open) { this.actor.add_style_pseudo_class('open'); - else + this._getTopMenu()._setOpenedSubMenu(this.menu); + } else { this.actor.remove_style_pseudo_class('open'); - - this._getTopMenu()._setOpenedSubMenu(this.menu); + this._getTopMenu()._setOpenedSubMenu(null); + } }, destroy: function() {